var t = getApp();

Page({
    data: {
        start: !1,
        address: "",
        is_default: !1,
        mobile: "",
        code: "",
        imgCode: "",
        captcha: "",
        qr: "",
        start1: !1,
        codetext: "获取短信验证码"
    },
    onLoad: function(t) {
        this.getMobbile();
    },
    onReady: function() {},
    captchainp: function(t) {
        var e = t.detail.value;
        this.setData({
            captcha: e
        });
    },
    sendCode: function(t) {
        if (this.data.start1) return !1;
        var e = 60, a = this;
        a.setData({
            start1: !0,
            codetext: "(" + e + ")秒后重新获取"
        });
        var n = setInterval(function() {
            a.setData({
                codetext: "(" + --e + ")秒后重新获取"
            });
        }, 1e3);
        setTimeout(function() {
            a.setData({
                codetext: "获取短信验证码",
                start1: !1
            }), clearInterval(n);
        }, 6e4), a.verificationCode(n);
    },
    changeImg: function() {
        this.getMobbile();
    },
    mobileinp: function(t) {
        var e = t.detail.value;
        this.setData({
            mobile: e
        });
    },
    getMobbile: function() {
        var e = this, a = t.getNetAddresss("plugin.integral.Frontend.Modules.Integral.Controllers.integral-currency-withdraw-address.fillInAddress");
        t._getNetWork({
            url: a,
            data: {},
            success: function(t) {
                var a = t.data;
                1 == a.result ? (wx.showToast({
                    icon: "none",
                    title: a.msg,
                    duration: 1500
                }), wx.navigateTo({
                    url: "/packageA/member/editmobile/editmobile"
                })) : (e.setData({
                    mobile: a.data.mobile,
                    imgCode: a.data.captcha ? a.data.captcha.img : ""
                }), wx.showToast({
                    icon: "none",
                    title: a.msg,
                    duration: 1500
                }));
            }
        });
    },
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});